<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>
<script>
  var count = 0;
  for (i = 1000; i <= 2000; i += 4) {
    if (i % 400 === 0 || i % 100 !== 0) {
    } else {
      document.write(i + " ");
      count++;
      if (count % 4 == 0) {
        document.write("<br>");
      }
    }
  }
</script>
